package pl.wr.physics.units.SI.derived.multidim;

import pl.wr.math.number.Fraction;
import pl.wr.physics.units.AbstractUnit;
import pl.wr.physics.units.SI.Prefix;
import pl.wr.physics.units.SI.base.m;

/**
 * Area - International System of Units (SI)
 * 
 * @version 1.0
 * @author wieslaw.rodak
 * 
 */
public final class m2 extends AbstractUnit {

	// TODO?
	public static final String symbol = "p";

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param value
	 *            in <code>int</code>
	 */
	public m2(int value) {
		this(Prefix.basic, value);
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param value
	 *            in <code>float</code>
	 */
	public m2(float value) {
		this(Prefix.basic, value);
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param value
	 *            in <code>Fraction</code>
	 */
	public m2(Fraction value) {
		this(Prefix.basic, value);
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>int</code>
	 */
	public m2(Prefix p, int value) {
		super(p, value, m2.class.getSimpleName());
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>float</code>
	 */
	public m2(Prefix p, float value) {
		super(p, value, m2.class.getSimpleName());
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>Fraction</code>
	 */
	public m2(Prefix p, Fraction value) {
		super(p, value, m2.class.getSimpleName());
	}

	/**
	 * area - m<sup>2</sup>
	 * 
	 * @param p
	 *            - prefix SI
	 * @param size1
	 *            - value in <code>Fraction</code>
	 * @param size2
	 *            - value in <code>Fraction</code>
	 */
	public m2(Prefix p, m size1, m size2) {
        super(p, Fraction.multiply(size1.getValue(), size2.getValue()), m2.class
				.getSimpleName());
	}

}
